<p><?= $this->Html->link('+Nova prodavnica', '/stores/create') ?></p>
<table class="entity-table clear">
<thead>
    <tr>
        <th width="5%">Logo</th>
        <th width="20%">Naziv</th>
        <th width="9%">Adresa</th>
        <th width="9%">Telefon</th>
        <th width="9%">Email</th>
        <th width="7%"></th>
    </tr>
</thead>
<tbody>
    <? if(! empty($stores)): ?>
        <? foreach ($stores as $k=>$row): ?>
        <?
            $store = $row['Store'];
        ?>
        <tr id="<?= $store['id'] ?>">
            <td><?= $this->Html->image('stores/'.$store['logo']) ?></td>
            <td><?= $store['name'] ?></td>
            <td><?= $store['address'] ?></td>
            <td><?= $store['phone'] ?></td>
            <td><?= $store['email'] ?></td>
            <td class="actions">
                <?= $this->App->action('delete', '/stores/delete/' . $store['id']) ?>
            </td>
        </tr>
        <? endforeach; ?>
    <? else: ?>
        <tr class="blank">
            <td colspan="7">Nema rezultata</td>
        </tr>
    <? endif; ?>
</tbody>
</table>
<?= $this->element("pagination") ?>

<script type="text/javascript">
$(function(){
    tableRowClick('/stores/edit/');
});
</script>